<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>医师审核</title>
    <?php require 'templates/common/head.html'; ?>
    <style type="text/css">
        .divleft{width: 9%;  min-height: 25px; float: left; text-align:center; border-right: solid 1px #d5d5d5; margin: 3px; }
        .divcenter{width: 9%; min-height: 25px; float: left; text-align:center; border-right: solid 1px #d5d5d5; margin: 3px; word-wrap:break-word; word-break:normal;}

        .divright{ width: 18%; min-height: 25px; float: right; text-align:center;  margin: 3px;}
        .position {
            position: absolute;
            display: none;
            z-index: 15;
            width: 400px;
            height: 40px;
            margin: -20px 0 0 -75px;
            padding: 0 10px;
            background: #eee;
            line-height: 2.4;
            cursor:pointer;
        }
        input[type="text"]{height: 30px; width: 80px;}
        input[type="date"]{height: 30px;}
        select{height: 30px;}
    </style>
</head>
<body>


<div class="container-fluid">
    <?php require 'templates/common/nav.html'; ?>
    <div class="panel panel-primary">
        <div class="panel-heading text-center"><h3 class="panel-title">医师审核</h3></div>
        <div class="panel-body" style="text-align:center">
            <div style="margin: 0 0 10px 0;text-align:left">
                <!--<b style="color:#3c763d;font-size: 16px;">姓名查询</b><br/>-->
                <form action="" method="get">
                    <input type="hidden" name="m" value="doctor_audit"/>
                    <input type="text" placeholder="医师姓名"  name="name" value="<?=$name?>">&nbsp;
                    <input type="text" placeholder="电话" name="telephone" value="<?=$telephone?>">&nbsp;
                    <input type="text" placeholder="省" name="province" value="<?=$province?>">&nbsp;
                    <input type="text" placeholder="市" name="city" value="<?=$city?>">&nbsp;
                    <input type="date" placeholder="关注时间" name="r_time"  />
                    <select name="hospitalLevel" id="hospitalLevel">
                        <option value="">医院等级</option>
                        <option value="三级特等" <?php if($hospitalLevel == '三级特等') echo 'selected';?>>三级特等</option>
                        <option value="三级甲等" <?php if($hospitalLevel == '三级甲等') echo 'selected';?>>三级甲等</option>
                        <option value="三级乙等" <?php if($hospitalLevel == '三级乙等') echo 'selected';?>>三级乙等</option>
                        <option value="三级丙等" <?php if($hospitalLevel == '三级丙等') echo 'selected';?>>三级丙等</option>
                        <option value="二级甲等" <?php if($hospitalLevel == '二级甲等') echo 'selected';?>>二级甲等</option>
                        <option value="二级乙等" <?php if($hospitalLevel == '二级乙等') echo 'selected';?>>二级乙等</option>
                        <option value="二级丙等" <?php if($hospitalLevel == '二级丙等') echo 'selected';?>>二级丙等</option>
                        <option value="一级甲等" <?php if($hospitalLevel == '一级甲等') echo 'selected';?>>一级甲等</option>
                        <option value="一级乙等" <?php if($hospitalLevel == '一级乙等') echo 'selected';?>>一级乙等</option>
                        <option value="一级丙等" <?php if($hospitalLevel == '一级丙等') echo 'selected';?>>一级丙等</option>
                        <option value="其他" <?php if($hospitalLevel == '其他') echo 'selected';?>>其他</option>
                    </select>
                    <select name="userType">
                        <option value="">类别</option>
                        <option value="医生" <?php if($userType == '医生') echo 'selected';?>>医生</option>
                        <option value="护士" <?php if($userType == '护士') echo 'selected';?>>护士</option>
                        <option value="医学生" <?php if($userType == '医学生') echo 'selected';?>>医学生</option>
                    </select>&nbsp;
                    <select name="title">
                        <option value="">职称</option>
                        <?php foreach($zhicheng_list as $k=>$v): ?>
                            <option value="<?=$v['name']?>" disabled><?=$v['name']?></option>
                            <?php foreach($v['childs'] as $k_1=>$v_1):?>
                                <option value="<?=$v_1?>" <?php if($v_1 == $title) echo 'selected';?>>&nbsp;&nbsp;<?=$v_1?></option>
                            <?php endforeach; ?>
                        <?php endforeach; ?>
                    </select>&nbsp;
                    <select name="keshi">
                    <option value="">科室</option>
                    <?php foreach($keshi_list as $k=>$v): ?>
                        <option value="<?=$v['name']?>" disabled><?=$v['name']?></option>
                        <?php foreach($v['childs'] as $k_1=>$v_1):?>
                            <option value="<?=$v_1?>" <?php if($v_1 == $keshi) echo 'selected';?>>&nbsp;&nbsp;<?=$v_1?></option>
                        <?php endforeach; ?>
                    <?php endforeach; ?>
                    </select>&nbsp;
                    <select name="findStatus">
                        <option value="">请选择医生状态</option>
                        <option value="待审核" <?php if($findStatus == '待审核') echo 'selected';?>>待审核</option>
                        <option value="未通过" <?php if($findStatus == '未通过') echo 'selected';?>>未通过</option>
                        <option value="通过" <?php if($findStatus == '通过') echo 'selected';?>>通过</option>
                        <option value="待完善" <?php if($findStatus == '待完善') echo 'selected';?>>待完善</option>
                    </select>&nbsp;
                    <select name="isUnsubscribe">
                        <option value="">是否取关</option>
                        <option value="yes" <?php if($isUnsubscribe == 'yes') echo 'selected';?>>是</option>
                        <option value="no" <?php if($isUnsubscribe == 'no') echo 'selected';?>>否</option>
                    </select>&nbsp;
                    导出 <input type="checkbox" name="isExport">&nbsp;
                    <button type="submit"  class="btn btn-default btn-success ">&nbsp;查 询&nbsp;</button>
                </form>
            </div>
            <div class="panel-group"  id="accordion" role="tablist" aria-multiselectable="true">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="row" style="">
                            <div class="divleft">头像</div>
                            <div class="divcenter">姓名</div>
                            <div class="divcenter">手机</div>
                            <div class="divcenter">医院</div>
                            <div class="divcenter">区域</div>
                            <div class="divcenter">医师资格证</div>
                            <div class="divcenter">医师资格证号</div>
                            <div class="divcenter">取关</div>
                            <div class="divright">操作</div>
                        </div>
                    </div>
                </div>
                <?php foreach($doctorDetails as $v):?>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="row">
                                <div class="divleft">
                                    <img src="<?=$v['头像']?>" width="100" height="100" style="cursor:pointer" class="fun"/>
                                    <div class="position" >
                                        <img src="<?=$v['头像']?>" width="100%" class="fun1"/>
                                    </div>
                                </div>
                                <div class="divcenter">
                                    <div class="fun"><?=$v['name']?></div>
                                </div>
                                <div class="divcenter">
                                    <div class="fun"><?=$v['telephone']?></div>
                                </div>
                                <div class="divcenter" >
                                    <div class="fun"><?=$v['医院']?></div>
                                </div>

                                <div class="divcenter">
                                    <div class="fun"><?=$v['province'].'-'.$v['city']?></div>
                                </div>
                                <div class="divcenter" >
                                    <?php if($v['照片']): ?>
                                    <img src="<?=$v['照片']?>" width="100" height="100" style="cursor:pointer" class="fun"/>
                                    <div class="position" >
                                        <img src="<?=$v['照片']?>" width="100%" class="fun1"/>
                                    </div>
                                    <?php endif; ?>
                                </div>
                                <div class="divcenter">
                                    <div class="fun"><?=$v['资格证号']?></div>
                                </div>
                                <div class="divcenter">
                                    <div class="fun"><?php if ($v['unsubscribe']){echo '是';}?></div>
                                </div>
                                <div class="divright">
                                    <form action="index.php?m=doctor_audit&a=update_doctor_status&page=<?=$_GET['page']?>&findStatus=<?=$findStatus?>" method="post" name="form" style="float: left;">
                                        <select name="update_status" class="btn_select">
                                            <option value="">请选择</option>
                                            <option value="通过" <?php if($v['状态']=='通过')echo selected; ?>>通过</option>
                                            <option value="未通过"<?php if($v['状态']=='未通过')echo selected; ?>>未通过</option>
                                            <option value="待审核"<?php if($v['状态']=='待审核')echo selected; ?>>待审核</option>
                                            <option value="待完善"<?php if($v['状态']=='待完善')echo selected; ?>>待完善</option>
                                        </select>
                                        <input type="hidden" name="doctor_id" value="<?=$v['id']?>"/>
                                        <input type="submit" value="确认"/>
                                    </form>
                                    <a href="index.php?m=doctor_audit&a=update_user&doctor_id=<?=$v['id']?>&user_id=<?=$v['用户id']?>&page=<?=$_GET['page']?>"><button class="btn-primary">修改</button></a>
                                </div>
                                <div style="clear: both;"></div>
                            </div>
                        </div>
                    </div>

                <?php endforeach;if(!$doctorDetails):?>
                <div class="panel-heading text-center"><h3 class="panel-title">没有数据 !!!</h3></div>
                <?php endif;?>
            </div>
            <div><?=$page->showpage();?></div>
        </div>

    </div>
</div>
<?php require 'templates/common/foot.html'; ?>
</body>
</html>
<script language="JavaScript">
    $(function(){
        $(".btn_select").change(function(){
            var status = $(this).val();
            if(status == '未通过'){
                var str=prompt("认证未通过的原因");
                $(this).append("<input type='hidden' name= 'reason' value='"+str+"'/>");
            }
        });
        $(".fun").click(function(){
            $(this).next("div").show();
        })
        $(".fun1").click(function(){
            $(this).parent("div").hide();
        })
    })

</script>
